package com.yuwei.database.dao

import androidx.room.*
import com.yuwei.database.entity.UserEntity

/**
 *
 */
@Dao
interface UserInfoDao {
    @Insert
    fun insertUserInfo(vararg userEntity: UserEntity) //vararg关键字 表示可变参数 可以传入多个UserEntity对象
    @Delete
    fun deleteUserInfo(vararg userEntity: UserEntity)
    @Update
    fun updateUserInfo(vararg userEntity: UserEntity)
    @Query("select * from user_info_table")
    fun selectAllUserInfo() : List<UserEntity>
    @Query("select * from user_info_table where id = :id")
    fun selectUserInfoById(id : Int) : UserEntity
}